import React, {Component} from 'react'

// export const Dictionary = (props) => (
//     <div>
//         <div>Result: {props.dictionary}</div>
//         <div>
//             <button onClick={props.increment}>+</button>
//             <button onClick={props.decrement}>-</button>
//         </div>
//     </div>
// )
//
// export default Dictionary

export default class Dictionary extends Component{
    render(){
        const {increment, decrement,incrementAsync, dictionary} = this.props;
        return (
            <div>
                <div>Result: {dictionary}</div>
                <div>
                    <button onClick={increment}>+</button>
                    <button onClick={decrement}>-</button>
                    <button onClick={incrementAsync}>Async Add</button>
                </div>
            </div>
        )
    }
}